<?php


class Goods_model extends CI_Model
{
	public  function  __construct(){
		parent::__construct();
		$this->load->database();
	}
	public function getAll(){
		$this->db->select('*');
		$query= $this->db->get('goods');
		return $query->result_array();
	}
	public function getOne($id){
		$this->db->where('id',$id);
		$this->db->select('*');
		$query= $this->db->get('goods');
		return $query->row_array();
	}

}
